package com.bana.fvs.task;

import com.bana.fvs.service.FogAreaService;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * 雾区能见度统计
 */
@Configuration
public class StatisticsTask {

    @Resource
    private FogAreaService fogAreaService;

    @Scheduled(fixedDelay=10*60*1000,initialDelay=10*60*1000)
    public void handle() throws IOException {

        fogAreaService.statisticsVisibility();
    }
}
